<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
     <h1>查询结果页面</h1>
    <a href="add.jsp">添加用户</a>
    <a href="query.action">返回首页</a>
    <table border="1">
    <tr>
    	<td>id编号</td>
    	<td>姓名</td>
    	<td>密码</td>
    	<td>电话</td>
    	<td>邮箱</td>
    	<td>修改用户信息</td>
    	<td>删除用户信息</td>
    </tr>
    <c:forEach items="tuser" var="tuser">
    	<tr>
    		<td>${tuser.id}</td>
	    	<td>${tuser.username}</td>
	    	<td>${tuser.password}</td>
	    	<td>${tuser.phone}</td>
	    	<td>${tuser.email}</td>
	    	<td>
	    		<a href="update.jsp?
	    		id=${tuser.id}
	    		&username=${tuser.username}
	    		&password=${tuser.password}
	    		&phone=${tuser.phone}
	    		&email=${tuser.email}">修改</a>
	    	</td>
	    	<td>
	    		<a href="delete.action?tuser.id=${tuser.id}">删除</a>
	    	</td>
    	</tr>
    </c:forEach>
    </table>
  </body>
</html>
